package com.catsic.mod.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.catsic.base.BaseEntity;
import com.catsic.core.entity.Organ;
import com.catsic.mod.status.WserviceStatus;
import com.catsic.pub.entity.Drawer;

/**
 * 接口实体类
 * 
 * @author yangyudi
 */
@Table(name = "S_WSERVICE")
@Entity
public class Wservice extends BaseEntity implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -553205123626409997L;

	/**
	 * 接口url
	 */
	@Column(name = "URL")
	private String url;

	/**
	 * 接口名称
	 */
	@Column(name = "NAME")
	private String name;

	/**
	 * 方法名称
	 */
	@Column(name = "METHODNAME")
	private String methodName;

	/**
	 * 接口类型
	 */
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "TYPE", referencedColumnName = "CODE")
	private Drawer drawer;
	
	/**
	 * 接口状态
	 */
	@Enumerated(EnumType.STRING)
	@Column(name = "STATUS")
	private WserviceStatus status = WserviceStatus.未报送;

	/**
	 * xzqh:所属省份
	 */
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "ORGANID", referencedColumnName = "ID")
	private Organ organ;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public Drawer getDrawer() {
		return drawer;
	}

	public void setDrawer(Drawer drawer) {
		this.drawer = drawer;
	}

	public WserviceStatus getStatus() {
		return status;
	}

	public void setStatus(WserviceStatus status) {
		this.status = status;
	}

	public Organ getOrgan() {
		return organ;
	}

	public void setOrgan(Organ organ) {
		this.organ = organ;
	}

}
